replacing only the first occurance of a character in string